import type { RouteRecordRaw } from "vue-router";
import Layout from "@/layout/Index.vue";

const routes: RouteRecordRaw[] = [
  {
    path: "/user",
    name: "User",
    component: Layout,
    meta: {
      title: "用户管理",
      icon: "lets-icons:user-box-fill",
      orderNum: 5,
    },
    redirect: "/user/list",
    children: [
      {
        path: "/user/list",
        name: "UserList",
        component: () =>
          import(/* webpackChunkName: "basic" */ "@/views/user/User.vue"),
        meta: {
          title: "用户管理",
          showInMenu: false,
        },
      },
      {
        path: "/user/profile",
        name: "UserProfile",
        component: () =>
          import(/* webpackChunkName: "basic" */ "@/views/user/Profile.vue"),
        meta: {
          title: "用户信息",
          showInMenu: false,
        },
      },
    ],
  },
];

export default routes;
